<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/8/23 0023
  Time: 16:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/score/goodsScore.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">
<script>
    var editor = UE.getEditor('editor');
</script>

<div style="float: left;margin-bottom: 7px;">
    <button type="button" class="btn btn-default-button entry" id="addInfo"
            style="float: left;background-color: #3c8dbc;color: #fff">
        添加积分商品
    </button>
</div>

<div class="input-group col-xs-2" style="float: left;margin-left: 5px">
    <input type="text" class="form-control entry" id="goods" name="name" placeholder="请在这里输入积分商品名称">
</div>
<div style="float: left;">
    <button type="button" class="btn query_button" onclick="clicke()" style="width: 100px;margin-left: 5px">
        <%--<span class="glyphicon glyphicon-search" aria-hidden="true"></span>--%>
        查询
    </button>
</div>

<table id="table"
       class="table table-striped table-bordered"
       data-toggle="table"
       data-url="${path}/web/score/queryGoodsScore"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-field="id" data-visible="false">编号</th>
        <th data-formatter="goodsPic">商品图片</th>
        <th data-field="scoreGoodsName">商品名称</th>
        <th data-field="needScore">所需积分</th>
        <th data-field="marketPrice">市场价</th>
        <th data-field="stock">库存</th>
        <th data-field="created">创建时间</th>
        <th data-formatter="operateFormatter" data-events="operateEvents">操作</th>
    </tr>
    </thead>
</table>

<div id="addInfo-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="80%" model-left="20%">
    <div class="box-header">
        <h3 class="box-title">添加积分商品</h3>
    </div>
    <form role="form" method="post" id="addInfoFrom">
        <div class="col-md-5">
            <div class="box-body">
                <label>商品名称:</label>
                <input type="text" class="form-control " name="goodsScore" id="goodsScore" required="required"
                       style="width: 50%">
            </div>
        </div>
        <%--<div class="box-body">--%>
        <%--<label>兑换热线:</label>--%>
        <%--<input type="text" class="form-control " name="hotLine" id="hotLines" required="required" style="width: 50%">--%>
        <%--</div>--%>
        <div class="col-md-5">
            <div class="box-body">
                <label>所需积分:</label>
                <input type="text" class="form-control " name="needScore" id="needScores" required="required"
                       style="width: 50%">
            </div>
        </div>
        <div class="col-md-5">
            <div class="box-body">
                <label>市场价格(元):</label>
                <input type="text" class="form-control " name="marketPrice" required="required" style="width: 50%"
                       id="marketPrice">
            </div>
        </div>
        <div class="col-md-5">
            <div class="box-body">
                <label>商品库存:</label>
                <input type="text" class="form-control " name="stock" required="required" style="width: 50%"
                       id="stocks">
            </div>
        </div>
        <div class="col-md-6">
            <div class="box-body">
                <label>图片logo:</label><br>
                <input type="hidden" name="listPic" id="listPic">
                <img id="pictures" class="addImage" src="${path}/static/images/commons/img_add.png"
                     width="150" height="150"><br><span style="color: red">推荐上传图片为800 x 800以上分辨率的图片</span>
            </div>
        </div>
        <div class="col-md-12">
            <div class="col-md-6" id="add_img">
                <label>商品轮播图:</label>
                <input type="hidden" name="goodsPic">
                <div data-id="div_image" class="col-md-12">
                    <img class="addImage" data-id="add_image" data-event="add_image"
                         src="${path}/static/images/commons/img_add.png" width="150"
                         height="150"><br><span style="color: red">推荐上传图片为800 x 800以上分辨率的图片</span>
                </div>
            </div>
        </div>
        <div class="col-md-12">
            <div class="box-body">
                <label>商品简介:</label>
                <textarea name="remark" hidden="hidden" id="remark"></textarea>
                <script class="editor" id="editor" type="text/plain" style="width:700px;height:200px;"></script>
            </div>
        </div>
    </form>
    <div class="col-md-12">
        <div class="box-footer">
            <button class="btn btn-info" data-event="submit-addInfo">确定</button>
            &nbsp;
            <button class="btn btn-danger close-model">关闭</button>
        </div>
    </div>
</div>


<div id="examine-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="70%" model-left="30%">
    <div class="box-header">
        <h3 class="box-title">查看详细</h3>
    </div>
    <input type="hidden" id="ids">
    <div class="col-md-5">
        <div class="box-body">
            <label>商品名称:</label>
            <input type="text" class="form-control " id="nameGoods" readonly="readonly" style="width: 50%">
        </div>
    </div>
    <%--<div class="box-body">--%>
    <%--<label>兑换热线:</label>--%>
    <%--<input type="text" class="form-control " id="hotLine" readonly="readonly" style="width: 50%">--%>
    <%--</div>--%>
    <div class="col-md-5">
        <div class="box-body">
            <label>所需积分:</label>
            <input type="text" class="form-control " id="needScore" readonly="readonly" style="width: 50%">
        </div>
    </div>
    <div class="col-md-5">
        <div class="box-body">
            <label>市场价格:</label>
            <input type="text" class="form-control " id="price" readonly="readonly" style="width: 50%">
        </div>
    </div>
    <div class="col-md-5">
        <div class="box-body">
            <label>商品库存:</label>
            <input type="text" class="form-control " id="stock" readonly="readonly" style="width: 50%">
        </div>
    </div>
    <div class="col-md-6">
        <div class="box-body">
            <label>图片logo:</label><br>
            <img id="photo" src="${path}/static/images/commons/img_add.png"
            onclick="enlargeImage(this)"   width="150" height="150" >
        </div>
    </div>

    <div class="col-md-12">
        <div class="form-group">
            <label>商家轮播图:</label>
            <div class="col-md-12" id="show_img">
            </div>
        </div>
    </div>

    <div class="col-md-12">
        <div class="box-body">
            <label>商品简介:</label>
            <script class="editor" id="UEditor" type="text/plain" style="width:700px;height:200px;"></script>
        </div>
    </div>
    <div class="col-md-12">
        <div class="box-footer">
            <button class="btn btn-danger close-model">关闭</button>
        </div>
    </div>
</div>

<div id="updateInfo-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="70%"
     model-left="30%">
    <div class="box-header">
        <h3 class="box-title">修改信息</h3>
    </div>
    <div class="box-body">
        <form role="form" method="post" id="updateInfoFrom">
            <input id="id" name="id" type="hidden">
            <div class="col-md-5">
                <div class="box-body">
                    <label>商品名称:</label>
                    <input type="text" class="form-control " id="nameGoodsUpdate" name="goodsScore" required="required"
                           style="width: 50%">
                </div>
            </div>
            <%--<div class="box-body">--%>
            <%--<label>兑换热线:</label>--%>
            <%--<input type="text" class="form-control " id="hotLineUpdate" name="hotLine" required="required"--%>
            <%--style="width: 50%">--%>
            <%--</div>--%>
            <div class="col-md-5">
                <div class="box-body">
                    <label>所需积分:</label>
                    <input type="text" class="form-control " id="needScoreUpdate" name="needScore" required="required"
                           style="width: 50%">
                </div>
            </div>
            <div class="col-md-5">
                <div class="box-body">
                    <label>市场价格:</label>
                    <input type="text" class="form-control " id="priceUpdate" name="marketPrice" required="required"
                           style="width: 50%">
                </div>
            </div>
            <div class="col-md-5">
                <div class="box-body">
                    <label>商品库存:</label>
                    <input type="text" class="form-control " id="stockUpdate" name="stock" required="required"
                           style="width: 50%">
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label>图片logo:</label><br>
                    <input type="hidden" name="listPic" id="list" alt="图片路径">
                    <img id="listPicture" class="addImage" src="${path}/static/images/commons/img_add.png"
                         width="150" height="150" style="margin-left: 4%"><br><span style="color: red">推荐上传图片为800 x 800以上分辨率的图片</span>
                </div>
            </div>
            <div class="col-md-12">
                <div class="form-group">
                    <label>商品轮播图:</label>
                    <input type="hidden" name="goodsPic" value="" alt="图片路径">

                    <div class="col-md-12" id="update_img">
                    </div>
                </div>
            </div>
            <div class="col-md-12">
                <div class="box-body">
                    <label>商品简介:</label>
                    <textarea name="remark" hidden="hidden" id="remarkes"></textarea>
                    <script class="editor" id="editors" type="text/plain" style="width:700px;height:200px;"></script>
                </div>
            </div>
        </form>
    </div>
    <div class="col-md-12">
        <div class="box-footer">
            <button class="btn btn-info" data-event="submit-updateInfo">确定</button>
            &nbsp;
            <button class="btn btn-danger close-model">关闭</button>
        </div>
    </div>
</div>

<div id="detailImage-div" class="slidingmenu box-model box box-info">
<div class="box box-info">
<div class="box-body">
<div class="form-group">
<div id="image" style="margin-top: 5%">

</div>
</div>
<div class="box-footer">
<button class="btn btn-danger close-model">关闭</button>
</div>
</div><!-- /.box-body -->
</div>
</div>
